{  ACMP.RU
   Problem 4. Text of problem: http://acmp.ru/?main=task&id_task=4
   Verdict: Accepted
}

var n,i:longint; res:int64;
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(n);
writeln(n,'9',9-n);
end.